<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>MongoDB深度解析 | 技术小馆</title>
    <link rel="stylesheet" href="https://cdn.staticfile.org/font-awesome/6.4.0/css/all.min.css">
    <link rel="stylesheet" href="https://cdn.staticfile.org/tailwindcss/2.2.19/tailwind.min.css">
    <link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;700&display=swap" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/mermaid@latest/dist/mermaid.min.js"></script>
    <style>
        body {
            font-family: 'Noto Sans SC', Tahoma, Arial, Roboto, "Droid Sans", "Helvetica Neue", "Droid Sans Fallback", "Heiti SC", "Hiragino Sans GB", Simsun, sans-serif;
            color: #333;
            line-height: 1.6;
        }
        
        h1, h2, h3, h4 {
            font-family: 'Noto Serif SC', serif;
            font-weight: 600;
        }
        
        .hero-gradient {
            background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
        }
        
        .card-hover {
            transition: all 0.3s ease;
        }
        
        .card-hover:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
        }
        
        .text-gradient {
            background: linear-gradient(90deg, #4f46e5, #7c3aed);
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
        }
        
        .timeline-item:before {
            content: '';
            position: absolute;
            left: -38px;
            top: 8px;
            width: 16px;
            height: 16px;
            border-radius: 50%;
            background: #4f46e5;
            border: 3px solid #e0e7ff;
        }
        
        .timeline-connector {
            position: absolute;
            left: -30px;
            top: 24px;
            bottom: -8px;
            width: 2px;
            background: #e0e7ff;
        }
        
        .mermaid-tooltip {
            display: none;
            position: absolute;
            background: white;
            padding: 8px;
            border-radius: 4px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
            z-index: 100;
            font-size: 14px;
        }
    </style>
</head>
<body class="bg-gray-50">
    <!-- Hero Section -->
    <section class="hero-gradient text-white py-20">
        <div class="container mx-auto px-6 lg:px-12">
            <div class="flex flex-col lg:flex-row items-center">
                <div class="lg:w-1/2 mb-10 lg:mb-0">
                    <h1 class="text-4xl lg:text-5xl font-bold mb-4">MongoDB 深度解析</h1>
                    <p class="text-xl mb-8 opacity-90 leading-relaxed">探索全球最流行的NoSQL数据库的设计哲学与技术实现</p>
                    <div class="flex space-x-4">
                        <div class="bg-white bg-opacity-20 px-4 py-2 rounded-full flex items-center">
                            <i class="fas fa-database mr-2"></i>
                            <span>文档数据库</span>
                        </div>
                        <div class="bg-white bg-opacity-20 px-4 py-2 rounded-full flex items-center">
                            <i class="fas fa-chart-line mr-2"></i>
                            <span>高性能</span>
                        </div>
                        <div class="bg-white bg-opacity-20 px-4 py-2 rounded-full flex items-center">
                            <i class="fas fa-expand-arrows-alt mr-2"></i>
                            <span>高扩展性</span>
                        </div>
                    </div>
                </div>
                <div class="lg:w-1/2 flex justify-center">
                    <div class="relative w-64 h-64 lg:w-80 lg:h-80">
                        <div class="absolute inset-0 bg-white bg-opacity-10 rounded-2xl transform rotate-6"></div>
                        <div class="absolute inset-0 bg-white bg-opacity-10 rounded-2xl transform -rotate-6"></div>
                        <div class="absolute inset-0 bg-white bg-opacity-10 rounded-2xl transform rotate-3"></div>
                        <div class="absolute inset-0 flex items-center justify-center">
                            <i class="fas fa-database text-8xl lg:text-9xl text-white opacity-80"></i>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <!-- Main Content -->
    <div class="container mx-auto px-6 lg:px-12 py-16">
        <!-- Chapter 1 -->
        <section class="mb-20">
            <div class="flex items-center mb-8">
                <div class="w-12 h-12 rounded-full bg-indigo-100 flex items-center justify-center mr-4">
                    <span class="text-2xl font-bold text-indigo-600">1</span>
                </div>
                <h2 class="text-3xl font-bold">MongoDB的起源与发展历程</h2>
            </div>
            
            <div class="grid md:grid-cols-2 gap-8 mb-12">
                <div class="bg-white rounded-xl shadow-md overflow-hidden card-hover">
                    <div class="p-6">
                        <h3 class="text-xl font-semibold mb-4 text-indigo-600">诞生背景与创始团队</h3>
                        <p class="text-gray-700 mb-4">MongoDB由10gen公司（现MongoDB Inc.）于2007年开发，创始团队包括Dwight Merriman、Eliot Horowitz和Kevin Ryan。</p>
                        <p class="text-gray-700">他们最初的目标是创建一个可扩展的、高性能的数据库系统，以解决传统关系型数据库在处理大规模数据时的局限性。</p>
                    </div>
                </div>
                
                <div class="bg-white rounded-xl shadow-md overflow-hidden card-hover">
                    <div class="p-6">
                        <h3 class="text-xl font-semibold mb-4 text-indigo-600">在NoSQL领域的地位</h3>
                        <p class="text-gray-700 mb-4">MongoDB是目前最流行的NoSQL数据库之一，在DB-Engines排名中持续位居前列。</p>
                        <p class="text-gray-700">它以其灵活的数据模型、强大的查询能力和良好的可扩展性，成为现代应用开发的首选数据库之一。</p>
                    </div>
                </div>
            </div>
            
            <h3 class="text-2xl font-semibold mb-6">发展里程碑与版本演进</h3>
            <div class="relative">
                <div class="border-l-2 border-indigo-100 pl-8 ml-4 space-y-10">
                    <div class="relative timeline-item">
                        <div class="absolute -left-8 w-64 h-px bg-indigo-100 top-6"></div>
                        <div class="bg-white p-6 rounded-lg shadow-sm relative z-10">
                            <div class="flex justify-between items-center mb-2">
                                <span class="font-bold text-indigo-600">2009年</span>
                                <span class="px-3 py-1 bg-indigo-100 text-indigo-800 rounded-full text-sm">重大发布</span>
                            </div>
                            <p>MongoDB 1.0正式发布</p>
                        </div>
                        <div class="timeline-connector"></div>
                    </div>
                    
                    <div class="relative timeline-item">
                        <div class="bg-white p-6 rounded-lg shadow-sm relative z-10">
                            <div class="flex justify-between items-center mb-2">
                                <span class="font-bold text-indigo-600">2010年</span>
                                <span class="px-3 py-1 bg-indigo-100 text-indigo-800 rounded-full text-sm">核心功能</span>
                            </div>
                            <p>MongoDB 1.6引入分片功能</p>
                        </div>
                        <div class="timeline-connector"></div>
                    </div>
                    
                    <div class="relative timeline-item">
                        <div class="bg-white p-6 rounded-lg shadow-sm relative z-10">
                            <div class="flex justify-between items-center mb-2">
                                <span class="font-bold text-indigo-600">2012年</span>
                                <span class="px-3 py-1 bg-indigo-100 text-indigo-800 rounded-full text-sm">查询增强</span>
                            </div>
                            <p>MongoDB 2.2引入聚合框架</p>
                        </div>
                        <div class="timeline-connector"></div>
                    </div>
                    
                    <div class="relative timeline-item">
                        <div class="bg-white p-6 rounded-lg shadow-sm relative z-10">
                            <div class="flex justify-between items-center mb-2">
                                <span class="font-bold text-indigo-600">2015年</span>
                                <span class="px-3 py-1 bg-indigo-100 text-indigo-800 rounded-full text-sm">存储引擎</span>
                            </div>
                            <p>MongoDB 3.0引入WiredTiger存储引擎</p>
                        </div>
                        <div class="timeline-connector"></div>
                    </div>
                    
                    <div class="relative timeline-item">
                        <div class="bg-white p-6 rounded-lg shadow-sm relative z-10">
                            <div class="flex justify-between items-center mb-2">
                                <span class="font-bold text-indigo-600">2018年</span>
                                <span class="px-3 py-1 bg-indigo-100 text-indigo-800 rounded-full text-sm">事务支持</span>
                            </div>
                            <p>MongoDB 4.0引入多文档ACID事务</p>
                        </div>
                        <div class="timeline-connector"></div>
                    </div>
                    
                    <div class="relative timeline-item">
                        <div class="bg-white p-6 rounded-lg shadow-sm relative z-10">
                            <div class="flex justify-between items-center mb-2">
                                <span class="font-bold text-indigo-600">2020年</span>
                                <span class="px-3 py-1 bg-indigo-100 text-indigo-800 rounded-full text-sm">分布式</span>
                            </div>
                            <p>MongoDB 4.4引入分布式事务</p>
                        </div>
                        <div class="timeline-connector"></div>
                    </div>
                    
                    <div class="relative timeline-item">
                        <div class="bg-white p-6 rounded-lg shadow-sm relative z-10">
                            <div class="flex justify-between items-center mb-2">
                                <span class="font-bold text-indigo-600">2022年</span>
                                <span class="px-3 py-1 bg-indigo-100 text-indigo-800 rounded-full text-sm">专业功能</span>
                            </div>
                            <p>MongoDB 6.0引入时序集合</p>
                        </div>
                    </div>
                </div>
            </div>
        </section>
        
        <!-- Chapter 2 -->
        <section class="mb-20">
            <div class="flex items-center mb-8">
                <div class="w-12 h-12 rounded-full bg-indigo-100 flex items-center justify-center mr-4">
                    <span class="text-2xl font-bold text-indigo-600">2</span>
                </div>
                <h2 class="text-3xl font-bold">与关系型数据库的对比</h2>
            </div>
            
            <div class="grid md:grid-cols-1 lg:grid-cols-2 gap-8 mb-12">
                <div class="bg-white rounded-xl shadow-md overflow-hidden card-hover">
                    <div class="p-6">
                        <h3 class="text-xl font-semibold mb-4 text-indigo-600">数据模型对比</h3>
                        <div class="overflow-x-auto">
                            <table class="min-w-full divide-y divide-gray-200">
                                <thead class="bg-gray-50">
                                    <tr>
                                        <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">关系型数据库</th>
                                        <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">MongoDB</th>
                                    </tr>
                                </thead>
                                <tbody class="bg-white divide-y divide-gray-200">
                                    <tr>
                                        <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-700">表(Table)</td>
                                        <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-700">集合(Collection)</td>
                                    </tr>
                                    <tr>
                                        <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-700">行(Row)</td>
                                        <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-700">文档(Document)</td>
                                    </tr>
                                    <tr>
                                        <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-700">列(Column)</td>
                                        <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-700">字段(Field)</td>
                                    </tr>
                                    <tr>
                                        <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-700">主键(Primary Key)</td>
                                        <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-700">_id字段</td>
                                    </tr>
                                    <tr>
                                        <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-700">外键(Foreign Key)</td>
                                        <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-700">引用(Reference)</td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
                
                <div class="bg-white rounded-xl shadow-md overflow-hidden card-hover">
                    <div class="p-6">
                        <h3 class="text-xl font-semibold mb-4 text-indigo-600">查询语言对比</h3>
                        <div class="mb-6">
                            <h4 class="text-sm font-semibold text-gray-500 mb-2">SQL查询示例</h4>
                            <div class="bg-gray-800 rounded-lg p-4 text-gray-100 overflow-x-auto">
                                <pre><code class="language-sql">-- SQL查询示例
SELECT * FROM users 
WHERE age > 18 AND city = 'New York';</code></pre>
                            </div>
                        </div>
                        <div>
                            <h4 class="text-sm font-semibold text-gray-500 mb-2">MongoDB查询示例</h4>
                            <div class="bg-gray-800 rounded-lg p-4 text-gray-100 overflow-x-auto">
                                <pre><code class="language-javascript">// MongoDB查询示例
db.users.find({
    age: { $gt: 18 },
    city: 'New York'
});</code></pre>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            
            <div class="grid md:grid-cols-2 gap-8">
                <div class="bg-white rounded-xl shadow-md overflow-hidden card-hover">
                    <div class="p-6">
                        <h3 class="text-xl font-semibold mb-4 text-indigo-600">架构对比</h3>
                        <ul class="space-y-3">
                            <li class="flex items-start">
                                <i class="fas fa-server text-indigo-500 mt-1 mr-3"></i>
                                <span class="text-gray-700"><span class="font-semibold">MongoDB：</span>分布式架构，支持水平扩展</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-project-diagram text-indigo-500 mt-1 mr-3"></i>
                                <span class="text-gray-700"><span class="font-semibold">关系型数据库：</span>主从架构，主要支持垂直扩展</span>
                            </li>
                        </ul>
                    </div>
                </div>
                
                <div class="bg-white rounded-xl shadow-md overflow-hidden card-hover">
                    <div class="p-6">
                        <h3 class="text-xl font-semibold mb-4 text-indigo-600">适用场景对比</h3>
                        <div class="grid grid-cols-2 gap-4">
                            <div>
                                <h4 class="text-sm font-semibold text-indigo-600 mb-2">MongoDB适合：</h4>
                                <ul class="text-sm text-gray-700 space-y-1">
                                    <li class="flex items-start">
                                        <i class="fas fa-check-circle text-green-500 mr-2 mt-0.5"></i>
                                        <span>需要快速迭代的应用</span>
                                    </li>
                                    <li class="flex items-start">
                                        <i class="fas fa-check-circle text-green-500 mr-2 mt-0.5"></i>
                                        <span>处理大量非结构化数据</span>
                                    </li>
                                    <li class="flex items-start">
                                        <i class="fas fa-check-circle text-green-500 mr-2 mt-0.5"></i>
                                        <span>需要高可扩展性的系统</span>
                                    </li>
                                    <li class="flex items-start">
                                        <i class="fas fa-check-circle text-green-500 mr-2 mt-0.5"></i>
                                        <span>实时大数据分析</span>
                                    </li>
                                </ul>
                            </div>
                            <div>
                                <h4 class="text-sm font-semibold text-indigo-600 mb-2">关系型数据库适合：</h4>
                                <ul class="text-sm text-gray-700 space-y-1">
                                    <li class="flex items-start">
                                        <i class="fas fa-check-circle text-blue-500 mr-2 mt-0.5"></i>
                                        <span>需要复杂事务的应用</span>
                                    </li>
                                    <li class="flex items-start">
                                        <i class="fas fa-check-circle text-blue-500 mr-2 mt-0.5"></i>
                                        <span>强一致性的业务场景</span>
                                    </li>
                                    <li class="flex items-start">
                                        <i class="fas fa-check-circle text-blue-500 mr-2 mt-0.5"></i>
                                        <span>复杂的表关联查询</span>
                                    </li>
                                    <li class="flex items-start">
                                        <i class="fas fa-check-circle text-blue-500 mr-2 mt-0.5"></i>
                                        <span>数据完整性要求高的系统</span>
                                    </li>
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>
        
        <!-- Chapter 3 -->
        <section class="mb-20">
            <div class="flex items-center mb-8">
                <div class="w-12 h-12 rounded-full bg-indigo-100 flex items-center justify-center mr-4">
                    <span class="text-2xl font-bold text-indigo-600">3</span>
                </div>
                <h2 class="text-3xl font-bold">文档模型与BSON格式详解</h2>
            </div>
            
            <div class="grid md:grid-cols-1 lg:grid-cols-2 gap-8 mb-12">
                <div class="bg-white rounded-xl shadow-md overflow-hidden card-hover">
                    <div class="p-6">
                        <h3 class="text-xl font-semibold mb-4 text-indigo-600">JSON与BSON的关系</h3>
                        <p class="text-gray-700 mb-4">BSON（Binary JSON）是MongoDB使用的二进制数据格式，它扩展了JSON格式，支持更多的数据类型。</p>
                        <div class="flex items-center bg-indigo-50 p-4 rounded-lg">
                            <i class="fas fa-info-circle text-indigo-600 text-2xl mr-3"></i>
                            <p class="text-gray-700">BSON的设计目标是提供高效的编解码性能、更高的存储效率和更丰富的数据类型支持。</p>
                        </div>
                    </div>
                </div>
                
                <div class="bg-white rounded-xl shadow-md overflow-hidden card-hover">
                    <div class="p-6">
                        <h3 class="text-xl font-semibold mb-4 text-indigo-600">文档结构示例</h3>
                        <div class="bg-gray-800 rounded-lg p-4 text-gray-100 overflow-x-auto">
                            <pre><code class="language-javascript">{
    "_id": ObjectId("507f1f77bcf86cd799439011"),
    "name": "张三",
    "age": 30,
    "email": "zhangsan@example.com",
    "address": {
        "city": "北京",
        "street": "朝阳区"
    },
    "hobbies": ["读书", "运动", "音乐"],
    "created_at": new Date()
}</code></pre>
                        </div>
                    </div>
                </div>
            </div>
            
            <div class="grid md:grid-cols-2 gap-8">
                <div class="bg-white rounded-xl shadow-md overflow-hidden card-hover">
                    <div class="p-6">
                        <h3 class="text-xl font-semibold mb-4 text-indigo-600">BSON类型系统</h3>
                        <div class="grid grid-cols-2 gap-4">
                            <div>
                                <ul class="text-sm text-gray-700 space-y-2">
                                    <li class="flex items-start">
                                        <i class="fas fa-circle text-indigo-500 text-xs mr-2 mt-1.5"></i>
                                        <span>基本类型：String, Int, Double, Boolean, Null</span>
                                    </li>
                                    <li class="flex items-start">
                                        <i class="fas fa-circle text-indigo-500 text-xs mr-2 mt-1.5"></i>
                                        <span>日期类型：Date</span>
                                    </li>
                                    <li class="flex items-start">
                                        <i class="fas fa-circle text-indigo-500 text-xs mr-2 mt-1.5"></i>
                                        <span>对象ID：ObjectId</span>
                                    </li>
                                </ul>
                            </div>
                            <div>
                                <ul class="text-sm text-gray-700 space-y-2">
                                    <li class="flex items-start">
                                        <i class="fas fa-circle text-indigo-500 text-xs mr-2 mt-1.5"></i>
                                        <span>二进制数据：BinData</span>
                                    </li>
                                    <li class="flex items-start">
                                        <i class="fas fa-circle text-indigo-500 text-xs mr-2 mt-1.5"></i>
                                        <span>正则表达式：RegExp</span>
                                    </li>
                                    <li class="flex items-start">
                                        <i class="fas fa-circle text-indigo-500 text-xs mr-2 mt-1.5"></i>
                                        <span>内嵌文档：Document</span>
                                    </li>
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
                
                <div class="bg-white rounded-xl shadow-md overflow-hidden card-hover">
                    <div class="p-6">
                        <h3 class="text-xl font-semibold mb-4 text-indigo-600">文档大小限制</h3>
                        <div class="flex items-start">
                            <div class="bg-indigo-100 text-indigo-800 rounded-full p-3 mr-4">
                                <i class="fas fa-exclamation-triangle text-xl"></i>
                            </div>
                            <div>
                                <p class="text-gray-700 mb-2">单个文档最大16MB</p>
                                <p class="text-gray-700 text-sm">建议保持文档大小在合理范围内（通常小于1MB）以获得最佳性能</p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>
        
        <!-- Chapter 4 -->
        <section class="mb-20">
            <div class="flex items-center mb-8">
                <div class="w-12 h-12 rounded-full bg-indigo-100 flex items-center justify-center mr-4">
                    <span class="text-2xl font-bold text-indigo-600">4</span>
                </div>
                <h2 class="text-3xl font-bold">MongoDB的核心优势与适用场景</h2>
            </div>
            
            <div class="grid md:grid-cols-2 lg:grid-cols-4 gap-6 mb-12">
                <div class="bg-white rounded-xl shadow-md overflow-hidden card-hover">
                    <div class="p-6">
                        <div class="w-12 h-12 rounded-full bg-indigo-100 flex items-center justify-center mb-4 text-indigo-600">
                            <i class="fas fa-bolt text-xl"></i>
                        </div>
                        <h3 class="text-xl font-semibold mb-3 text-indigo-600">高性能读写</h3>
                        <ul class="text-gray-700 space-y-2 text-sm">
                            <li class="flex items-start">
                                <i class="fas fa-check text-indigo-500 mr-2 mt-0.5"></i>
                                <span>内存映射文件</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-check text-indigo-500 mr-2 mt-0.5"></i>
                                <span>索引支持</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-check text-indigo-500 mr-2 mt-0.5"></i>
                                <span>文档级并发控制</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-check text-indigo-500 mr-2 mt-0.5"></i>
                                <span>高效的查询优化器</span>
                            </li>
                        </ul>
                    </div>
                </div>
                
                <div class="bg-white rounded-xl shadow-md overflow-hidden card-hover">
                    <div class="p-6">
                        <div class="w-12 h-12 rounded-full bg-indigo-100 flex items-center justify-center mb-4 text-indigo-600">
                            <i class="fas fa-shapes text-xl"></i>
                        </div>
                        <h3 class="text-xl font-semibold mb-3 text-indigo-600">灵活模式</h3>
                        <ul class="text-gray-700 space-y-2 text-sm">
                            <li class="flex items-start">
                                <i class="fas fa-check text-indigo-500 mr-2 mt-0.5"></i>
                                <span>无需预定义模式</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-check text-indigo-500 mr-2 mt-0.5"></i>
                                <span>支持动态字段</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-check text-indigo-500 mr-2 mt-0.5"></i>
                                <span>易于适应需求变化</span>
                            </li>
                        </ul>
                    </div>
                </div>
                
                <div class="bg-white rounded-xl shadow-md overflow-hidden card-hover">
                    <div class="p-6">
                        <div class="w-12 h-12 rounded-full bg-indigo-100 flex items-center justify-center mb-4 text-indigo-600">
                            <i class="fas fa-expand-arrows-alt text-xl"></i>
                        </div>
                        <h3 class="text-xl font-semibold mb-3 text-indigo-600">易扩展性</h3>
                        <ul class="text-gray-700 space-y-2 text-sm">
                            <li class="flex items-start">
                                <i class="fas fa-check text-indigo-500 mr-2 mt-0.5"></i>
                                <span>水平扩展能力</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-check text-indigo-500 mr-2 mt-0.5"></i>
                                <span>分片集群</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-check text-indigo-500 mr-2 mt-0.5"></i>
                                <span>复制集</span>
                            </li>
                        </ul>
                    </div>
                </div>
                
                <div class="bg-white rounded-xl shadow-md overflow-hidden card-hover">
                    <div class="p-6">
                        <div class="w-12 h-12 rounded-full bg-indigo-100 flex items-center justify-center mb-4 text-indigo-600">
                            <i class="fas fa-building text-xl"></i>
                        </div>
                        <h3 class="text-xl font-semibold mb-3 text-indigo-600">成功案例</h3>
                        <ul class="text-gray-700 space-y-2 text-sm">
                            <li class="flex items-start">
                                <i class="fas fa-check text-indigo-500 mr-2 mt-0.5"></i>
                                <span>阿里巴巴：商品目录系统</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-check text-indigo-500 mr-2 mt-0.5"></i>
                                <span>腾讯：游戏数据存储</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-check text-indigo-500 mr-2 mt-0.5"></i>
                                <span>百度：用户行为分析</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-check text-indigo-500 mr-2 mt-0.5"></i>
                                <span>美团：订单系统</span>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
            
            <h3 class="text-2xl font-semibold mb-6">MongoDB生态系统概览</h3>
            <div class="bg-white rounded-xl shadow-md overflow-hidden p-6">
                <div class="mermaid">
                    flowchart TD
                        A[MongoDB核心] --> B[存储引擎]
                        A --> C[查询引擎]
                        A --> D[分布式架构]
                        
                        B --> B1[WiredTiger]
                        B --> B2[In-Memory]
                        
                        C --> C1[查询优化器]
                        C --> C2[聚合管道]
                        C --> C3[全文搜索]
                        
                        D --> D1[分片]
                        D --> D2[复制集]
                        D --> D3[ACID事务]
                        
                        E[工具与服务] --> E1[MongoDB Atlas]
                        E --> E2[MongoDB Compass]
                        E --> E3[MongoDB Charts]
                        E --> E4[BI Connector]
                </div>
                <div class="text-sm text-gray-500 mt-4 text-center">点击图表元素可查看详细信息</div>
            </div>
        </section>
    </div>
    
    <!-- Footer -->
    <footer class="bg-gray-900 text-gray-300 py-12">
        <div class="container mx-auto px-6">
            <div class="flex flex-col items-center">
                <div class="text-2xl font-semibold mb-4 text-white">技术小馆</div>
                <p class="mb-6 text-center max-w-lg">探索前沿技术，分享实用知识</p>
                <div class="flex space-x-4">
                    <a href="http://www.yuque.com/jtostring" target="_blank" class="px-4 py-2 bg-gray-800 rounded-full hover:bg-gray-700 transition-colors">
                        <i class="fas fa-globe mr-2"></i>技术小馆地址
                    </a>
                </div>
                <div class="mt-8 text-sm text-gray-500">
                    © 2023 技术小馆. 保留所有权利.
                </div>
            </div>
        </div>
    </footer>
    
    <script>
        document.addEventListener('DOMContentLoaded', function() {
            // Initialize Mermaid
            mermaid.initialize({
                startOnLoad: true,
                theme: 'default',
                flowchart: {
                    useMaxWidth: false,
                    htmlLabels: true,
                    curve: 'basis'
                }
            });
            
            // Add hover effect for mermaid elements
            document.querySelectorAll('.mermaid .node').forEach(node => {
                node.style.cursor = 'pointer';
                node.addEventListener('mouseover', function() {
                    const tooltip = document.createElement('div');
                    tooltip.className = 'mermaid-tooltip';
                    tooltip.textContent = this.getAttribute('data-tooltip') || this.textContent.trim();
                    document.body.appendChild(tooltip);
                    
                    const rect = this.getBoundingClientRect();
                    tooltip.style.left = (rect.left + rect.width/2 - tooltip.offsetWidth/2) + 'px';
                    tooltip.style.top = (rect.top - tooltip.offsetHeight - 10) + 'px';
                    tooltip.style.display = 'block';
                    
                    this._tooltip = tooltip;
                });
                
                node.addEventListener('mouseout', function() {
                    if (this._tooltip) {
                        document.body.removeChild(this._tooltip);
                        this._tooltip = null;
                    }
                });
            });
            
            // Smooth scrolling for anchor links
            document.querySelectorAll('a[href^="#"]').forEach(anchor => {
                anchor.addEventListener('click', function (e) {
                    e.preventDefault();
                    document.querySelector(this.getAttribute('href')).scrollIntoView({
                        behavior: 'smooth'
                    });
                });
            });
        });
    </script>
</body>
</html>